//index.js
//获取应用实例
const util = require('../../utils/util.js')
const app = getApp()
Page({
  data: {
    url: util.URL
  },
  onLoad: function() {
  },
  getMessage(e) {
    console.log('分享的时候才能收到', e.detail.arg)
  },
  getUserInfo: function(e) {
    // console.log(e)
    app.globalData.userInfo = e.detail.userInfo
    this.setData({
      userInfo: e.detail.userInfo,
      hasUserInfo: true
    })
  },
  onShareAppMessage(options) {
    return {
      title: '分享',
      path: this.url
    }
  }
})